<!DOCTYPE html>
<html>
<head>
	<title>编辑配置</title>
    <include file='public/head'>
</head>
<body>
	<!-- layui-tab开始 -->
	<div class="layui-tab" lay-filter="demo-tab" >
        <form class="layui-form" action="">
            <div class="layui-form-item">
                <label class="layui-form-label">地址(rule)</label>
                <div class="layui-input-block">
                    <input type="text" name="rule" required  lay-verify="required" placeholder="请输入地址" value="{$conf->rule|default=''}" autocomplete="off" class="layui-input">
                    <input type="hidden" name="id"  value="{$conf->id}" />
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">事件别名</label>
                <div class="layui-input-block">
                    <input type="text" name="action_alias" required  lay-verify="required" placeholder="请输入事件别名" value="{$conf->action_alias|default=''}" autocomplete="off" class="layui-input">
                </div>
            </div>
            
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button style="display:none;" id="add_sub" class="layui-btn" lay-submit lay-filter="addD">立即提交</button>
                </div>
            </div>
        </form>
 

    </div>


	<include file='public/scripts'>

	<!-- script开始-->	
	<script>
	;!function(){
		var form = layui.form
			,layer = layui.layer    //弹出层必需
			,layedit = layui.layedit  //富文本必需
			,laydate = layui.laydate  //日期选择必需
			,table = layui.table  //表格必需
			,element = layui.element;  //选项卡	
			
        //监听提交
        form.on('submit(addD)', function(data){

            $.post( '{:cmf_plugin_url("Log://config/editpost")}' , { data:data.field } , function( res ){
                
                layer.msg( res.message , {time:800 , icon : res.code==200?1:5} , function(){
                    if( res.code ==200 ){
                        parent.location.reload();
                    }
                } );
            } );
            return false;
        });
    	
    	
	}();
    
    function callbackd() {
        $( '#add_sub' ).click();
    }
    

	</script>
	<!-- script结束-->

</body>
</html>